	{literal}
	<script type="text/javascript">
	//<![CDATA[
	function SetState(obj_checkbox, obj_textarea) {
		if(obj_checkbox.checked) {
			obj_textarea.disabled = false;
		}
		else {
			obj_textarea.disabled = true;
		}
	}
	function textCounter(field, countfield, maxlimit) {
		if (field.value.length > maxlimit) // if too long...trim it!
			field.value = field.value.substring(0, maxlimit);
		// otherwise, update 'characters left' counter
		else
			countfield.value = maxlimit - field.value.length + " Characters Left";
	}
	function counter(text) {
		text.form.text_num.value = text.value.length;
	}
	//]]>
	</script>
	{/literal}
	<div id="newsnav_wrapper">
		<ul class="newsnav ucase">
			<li class="active"><a href="#"><span>{#PLIGG_Visual_EditStory_Header#}</span></a></li>
		</ul>
	</div>
	{checkActionsTpl location="tpl_pligg_submit_step2_start"}
	<div id="submit" class="box">
		<form action="" method="post" id="thisform" enctype="multipart/form-data">
			<input type="hidden" name="id" value="{$submit_id}" />
			{$hidden_token_edit_link}
			<div class="divset">
				<h2>{#PLIGG_Visual_Submit2_Source#}</h2>
				<div class="content">
					<strong>{#PLIGG_Visual_Submit2_URLTitle#}:</strong> {$submit_url_title}<br />
					<label for="url"><strong>{#PLIGG_Visual_Submit2_NewsURL#}:</strong></label> <a href="{$submit_url}">{$submit_url}</a><br />
					{if $isAdmin eq 1}<input type="text" name="url" id="url" value ="{$submit_url}" />{/if}
				</div>
				<div class="bottom"><!-- //--></div>
			</div>					
			<div class="divset">
				<h2><label for="title">{#PLIGG_Visual_Submit2_Title#}</label></h2>
				<div class="content">
					<input type="text" id="title" name="title" value="{$submit_title}" maxlength="{$maxTitleLength}" />
					<span class="submit_instructions">{#PLIGG_Visual_Submit2_TitleInstruct#}</span>
				</div>
				<div class="bottom"><!-- //--></div>
			</div>					
			<div class="divset">
				<h2><label for="category">{#PLIGG_Visual_Submit2_Category#}</label></h2>
				<div class="content">
					<select id="category" name="category">
						<option value = "">{#PLIGG_Visual_Submit2_CatInstructSelect#}</option>
						{section name=thecat loop=$cat_array}
						<option value="{$cat_array[thecat].auto_id}"{if $cat_array[thecat].auto_id eq $submit_category} selected="selected"{/if}>
						{if $cat_array[thecat].spacercount lt $lastspacer}{$cat_array[thecat].spacerdiff|repeat_count:''}{/if}
						{if $cat_array[thecat].spacercount gt $lastspacer}{/if}
						{$cat_array[thecat].spacercount|repeat_count:'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'}
						{$cat_array[thecat].name} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						{assign var=lastspacer value=$cat_array[thecat].spacercount}					
						</option>
						{/section}
					</select>
					<span class="submit_instructions">{#PLIGG_Visual_Submit2_CatInstruct#}</span>
				</div>
				<div class="bottom"><!-- //--></div>
			</div>					
			<div class="divset">
				<h2><label for="bodytext">{#PLIGG_Visual_Submit2_Description#}</label></h2>
				<div class="content">
					{if $Story_Content_Tags_To_Allow eq ""}
					<div class="msg_warning"><strong>{#PLIGG_Visual_Submit2_No_HTMLTagsAllowed#}</strong> {#PLIGG_Visual_Submit2_HTMLTagsAllowed#}</div>
					{else}
					<div class="msg_warning"><strong>{#PLIGG_Visual_Submit2_HTMLTagsAllowed#}:</strong> {$Story_Content_Tags_To_Allow}</div>
					{/if}
					<textarea name="bodytext" id="bodytext" class="bodytext" rows="7" cols="10" wrap="soft" onkeypress="counter(this)" onkeydown="counter(this)" {if $SubmitSummary_Allow_Edit eq 1}onkeyup="counter(this); if(!this.form.summarycheckbox || !this.form.summarytext) return; if(this.form.summarycheckbox.checked == false) {ldelim}this.form.summarytext.value = this.form.bodytext.value.substring(0, {$StorySummary_ContentTruncate});{rdelim}textCounter(this.form.summarytext,this.form.remLen, {$StorySummary_ContentTruncate});"{else}onkeyup="counter(this);"{/if}>{$submit_content}</textarea><br />
					<input type="text" name="text_num" id="text_num" value="{$storylen}" size="2" disabled="disabled" class="storylen" /> {#PLIGG_Visual_Total_Chars#}
					<span class="submit_instructions">{#PLIGG_Visual_Submit2_DescInstruct#}</span>
					{if $Spell_Checker eq 1}<input type="button" name="spelling" value="{#PLIGG_Visual_Check_Spelling#}" onclick="openSpellChecker('bodytext');" />{/if}
				</div>
				<div class="bottom"><!-- //--></div>
			</div>					
			{if $SubmitSummary_Allow_Edit eq 1}
			<div class="divset">
				<h2><label for="summarytext">{#PLIGG_Visual_Submit2_Summary#}</label></h2>
				<div class="content">
					<input type="checkbox" name="summarycheckbox" id="summarycheckbox" onclick="SetState(this, this.form.summarytext)" checked="checked" />  <label for="summarycheckbox">{#PLIGG_Visual_Submit2_SummaryCheckBox#}</label>
					{if $Story_Content_Tags_To_Allow eq ""}
					<div class="msg_warning"><strong>{#PLIGG_Visual_Submit2_No_HTMLTagsAllowed#}</strong> {#PLIGG_Visual_Submit2_HTMLTagsAllowed#}</div>
					{else}
					<div class="msg_warning"><strong>{#PLIGG_Visual_Submit2_HTMLTagsAllowed#}:</strong> {$Story_Content_Tags_To_Allow}</div>
					{/if}
					<textarea name="summarytext" id="summarytext" rows="5" cols="10" wrap="soft" onkeydown="textCounter(this.form.summarytext,this.form.remLen, {$StorySummary_ContentTruncate});">{$submit_summary}</textarea>
					<input type="text" name="remLen" value="{$StorySummary_ContentTruncate} {#PLIGG_Visual_Submit2_SummaryCharactersLeft#}" readonly="readonly" />
					<span class="submit_instructions">{#PLIGG_Visual_Submit2_SummaryInstruct#}{#PLIGG_Visual_Submit2_SummaryLimit#}{$StorySummary_ContentTruncate}{#PLIGG_Visual_Submit2_SummaryLimitCharacters#}</span>
					{if $Spell_Checker eq 1}<input type="button" name="spelling" value="{#PLIGG_Visual_Check_Spelling#}" onclick="openSpellChecker('summarytext');" />{/if}
				</div>
				<div class="bottom"><!-- //--></div>
			</div>
			{/if}					
			{if $enable_tags}
			<div class="divset">
				<h2><label for="tags">{#PLIGG_Visual_Submit2_Tags#}</label></h2>
				<div class="content">
					<input type="text" id="tags" name="tags" value="{$tags_words}" maxlength="{$maxTagsLength}" />
					<span class="submit_instructions">
						<strong>{#PLIGG_Visual_Submit2_Tags_Inst1#}</strong> {#PLIGG_Visual_Submit2_Tags_Example#} <em>{#PLIGG_Visual_Submit2_Tags_Inst2#}</em>
					</span>
				</div>
				<div class="bottom"><!-- //--></div>
			</div>
			{/if}
			{if $canIhaveAccess eq 1}
			<div class="divset">
				<h2><label for="notify">{#PLIGG_Visual_EditStory_Notify#}</label></h2>
				<div class="content">
					<input type="checkbox" name="notify" id="notify" value="yes" /><span class="radio_pos">{#PLIGG_Visual_EditStory_NotifyText#}</span><br />
					<input type="radio" name="reason" value="typo" onclick="notify.checked = 'true';" /><span class="radio_pos">{#PLIGG_Visual_EditStory_Reason_typo#}</span><br />
					<input type="radio" name="reason" value="category" onclick="notify.checked = 'true';" /><span class="radio_pos">{#PLIGG_Visual_EditStory_Reason_category#}</span><br />
					<input type="radio" name="reason" value="tags" onclick="notify.checked = 'true';" /><span class="radio_pos">{#PLIGG_Visual_EditStory_Reason_tags#}</span><br />
					<input type="radio" name="reason" value="foul" onclick="notify.checked = 'true';" /><span class="radio_pos">{#PLIGG_Visual_EditStory_Reason_foul#}</span><br />
					<input type="radio" name="reason" value="other" onclick="notify.checked = 'true';" /><span class="radio_pos">{#PLIGG_Visual_EditStory_Reason_other#}</span>
					<input type="text" name="otherreason" />
				</div>
				<div class="bottom"><!-- //--></div>
			</div>
			{/if}
			{checkActionsTpl location="submit_step_2_pre_extrafields"}
			{include file=$tpl_extra_fields.".tpl"}
			<input type="submit" value="{#PLIGG_Visual_Submit2_Continue#}" class="submit_button" />
		</form>
	</div>